@import "../../color.less";

.wrap {
    display: flex;
    padding: 0px 20px 20px;
    .text {
        word-break: break-all;
        font-size: 14px;
        color: black;
        position: relative;
        border-radius: 4px;
        padding: 10px 8px;
        line-height: 20px;
        min-height: 40px;
        i {
            position: absolute;
            font-size: 16px;
        }
        .msg {
            position: absolute;
            word-break: normal;
            top: -20px;
            width: 400px;
            font-size: 12px;
            color: rgba(0, 0, 0, 0.5);
        }
        .textContent {
            // white-space: pre // 空白会被浏览器保留。其行为方式类似 HTML 中的 <pre> 标签。
            white-space: pre-wrap;
        }
    }
}

.wrap.center {
    justify-content: normal;
    .text {
        width: 100%;
        padding: 0;
        color: #aeaeae;
        text-align: center;
        .time {
            text-align: center;
            padding: 14px 0;
            color: #aeaeae;
        }
        div {
            width: calc(100% - 70px);
            display: inline-block;
            //color: rgba(0, 0, 0, 0.8);
            color: #aeaeae;
            text-align: left;
        }
        button {
            padding: 0;
            white-space: pre-wrap;
            text-align: left;
        }
    }
}

.wrap.left {
    flex-direction: row;
    .text {
        background-color: #fff;
        margin-left: 14px;
        margin-top: 18px;
        i {
            left: -10px;
            top: -2px;
            color: #fff;
        }
        .msg {
            left: 0;
            text-align: left;
        }
    }
}
.wrap.right {
    flex-direction: row-reverse;
    .text {
        background-color: #b0e36e;
        margin-right: 14px;
        margin-top: 18px;
        i {
            right: -10px;
            top: -2px;
            color: #b0e36e;
        }
        .msg {
            right: 0;
            text-align: right;
        }
    }
}
.wrap.location {
    .text {
        background-color: #f3f3f3;
        width: 360px;
        padding: 0;
        .map {
            width: 100%;
            height: 220px;
            border-radius: 4px;
            overflow: hidden;
            position: relative;
            img {
                width: 100%;
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
            }
            .localText {
                position: absolute;
                bottom: 0;
                width: 100%;
                background-color: rgba(0, 0, 0, .3);
                padding: 4px 6px;
                font-size: 14px;
                color: #fff;
                h4 {
                    color: #fff;
                    margin: 0;
                    padding-bottom: 2px;
                    font-size: 16px;
                }
            }
        }
    }
}

